package hxy.bytecode.reflact.clazz;

import java.util.Scanner;

/**
 * @author eric
 * @program bytecode
 * @description 测试类
 * @date 2020/2/20
 */
public class Phone {


    public static void main(String[] args) {
        Scanner in1 = new Scanner(System.in);
        String nextLine = in1.nextLine();
        String clazzName = "hxy.bytecode.reflact.clazz." + nextLine;
        try {
            Class c = Class.forName(clazzName);
            PhoneInterface cellPhone = (PhoneInterface) c.getDeclaredConstructor().newInstance();
            cellPhone.ring();
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}



